package br.ufal.ic.util;


import org.hibernate.cfg.Configuration;
import org.hibernate.tool.hbm2ddl.SchemaExport;


/**
 * Classe que cria as tabelas no banco de dado.
 * 
 * @author Marcos Paulo
 */
public class GenerateDB {
    
    public static void main(String[] args) {
        
        createDatabase(HibernateUtil.getConfiguration());
    }

    public static void createDatabase(Configuration configuration) {
        SchemaExport schemaExport = new SchemaExport(configuration);
        schemaExport.drop(true, true);
        schemaExport.create(true, true);

    }
}
